package cn.nubia.admin.common.shiro.password;

import org.apache.shiro.authc.credential.PasswordService;

/**
 * Created by Administrator on 2014/10/28.
 */
public class SimplePasswordService implements PasswordService {
    @Override
    public String encryptPassword(Object plaintextPassword) throws IllegalArgumentException {
        return (String)plaintextPassword;
    }

    @Override
    public boolean passwordsMatch(Object submittedPlaintext, String encrypted) {
        return encrypted.equals(new String((char[])submittedPlaintext));
    }
}
